import request from '@/utils/request'

export function loginByUsername(mobile, verification_code) {
  return request({
    url: 'v1/users/login',
    method: 'post',
    data: {
      mobile: mobile,
      verification_code: verification_code,
      host_type: '1'
    }
  })
}

export function sendMsg(mobile) {
  return request({
    url: 'v1/sms/send',
    method: 'post',
    data: {
      mobile: mobile
    }
  })
}

export function logout() {
  return request({
    url: 'v1/users/logout',
    method: 'get'
  })
}

export function getUserInfo() {
  return request({
    url: 'v1/users/get-auth',
    method: 'get'
  })
}

export function getMenuInfo() {
  return request({
    url: 'v1/users/get-menu',
    method: 'get'
  })
}
